{extend name="base/main" }

{block name="body"}


<div class="kd ">
    <div class="art-news-box m-t-20 clearfix ">
        <?php 
        //按时间取17个新闻，分成四份，第一份5张，第二份2张，第三份5张，第四份5张
        $newslist = db('article_doc',[] , false)->where('pic!=""')->where("category_id=114 || category_id=115")->order('create_time desc')->limit(17)->select();
        $newslist1 = array_slice($newslist,0,5);
        $newslist2 = array_slice($newslist,5,2);
        $newslist3 = array_slice($newslist,7,5);
        $newslist4 = array_slice($newslist,12,5);
        ?>
      <div class="art-news-left pull-left ">
        <div class="art-slider1 ">
          <div
            class="swiper-container swiper-container0 artswiper "
          >
            <div class="swiper-wrapper ">
              <?php foreach($newslist1 as $v): ?>
              <div class="swiper-slide ">
                <a href="/news/<?php echo $v['id']; ?>.html" target="_blank">
                    <img src="<?php echo $v['pic']; ?>" width="460" height="340" alt="<?php echo $v['title']; ?>" /></a>
                <div class="swiper-text ">
                    <?php echo $v['title']; ?>
                </div>
              </div>
              <?php endforeach; ?>
            </div>
            <div
              class="swiper-pagination swiper-pagination0 "
            ></div>
          </div>
        </div>
        <ul class="art-item1 ">
          <?php foreach($newslist2 as $v): ?>
          <li>
            <a href="/news/<?php echo $v['id']; ?>.html" target="_blank">
              <div class="art-item1-img ">
                <img src="<?php echo $v['pic']; ?>" />
              </div>
              <div class="art-item1-ti ">
                <?php echo $v['title']; ?>
              </div>
            </a>
          </li>
          <?php endforeach; ?>
        </ul>
      </div>
      <div class="art-news-center pull-left ">
        <div class="art-news-biaoti-box ">
          <span></span>最新资讯
        </div>
        <div class="art-news-div ">
          <ul class="art-news-ul ">
            <?php foreach($newslist3 as $v): ?>
            <li>
              <span class="round "></span><a href="/news/<?php echo $v['id']; ?>.html" target="_blank"><?php echo $v['title']; ?></a>
            </li>
            <?php endforeach; ?>
            
          </ul>
          <ul class="art-news-ul ">
            <?php foreach($newslist4 as $v): ?>
            <li>
              <span class="round "></span><a href="/news/<?php echo $v['id']; ?>.html" target="_blank"><?php echo $v['title']; ?></a>
            </li>
            <?php endforeach; ?>
          </ul>
        </div>
      </div>

      <div class="art-news-right pull-left ">
        <div class="art-news-biaoti-box ">
          <span></span>热门录像
        </div>
        <div class="art-yc-news-div ">
            <?php 
            $shipinlist = db('article_doc',[] , false)->where('pic!=""')->where("category_id=100 || category_id=101")->order('create_time desc')->limit(6)->select();
            //分成两份，每份3个
            $shipinlist1 = array_slice($shipinlist,0,3);
            $shipinlist2 = array_slice($shipinlist,3,3);
            ?>
          <ul class="art-yc-ul ">
            <?php foreach($shipinlist1 as $k=> $v): ?>
            <li>
              <a href="/news/<?php echo $v['id']; ?>.html" target="_blank">
                <?php if($k == 0): ?>
                <div class="art-yc-img ">
                  <img
                    src="<?php echo $v['pic']; ?>"
                  />
                </div>
                <div class="art-yc-ti ">
                    <?php echo $v['title']; ?>
                </div>
                <?php else: ?>
                <div class="art-yc-ti2 ">
                    <?php echo $v['title']; ?>
                  </div>
                <?php endif; ?>
              </a>
            </li>
            <?php endforeach; ?>
          </ul>
          <ul class="art-yc-ul ">
            <?php foreach($shipinlist2 as $k=> $v): ?>
            <li>
              <a href="/news/<?php echo $v['id']; ?>.html" target="_blank">
                <?php if($k == 0): ?>
                <div class="art-yc-img ">
                  <img
                    src="<?php echo $v['pic']; ?>"
                  />
                </div>
                <div class="art-yc-ti ">
                    <?php echo $v['title']; ?>
                </div>
                <?php else: ?>
                <div class="art-yc-ti2 ">
                    <?php echo $v['title']; ?>
                  </div>
                <?php endif; ?>
              </a>
            </li>
            <?php endforeach; ?>
          </ul>
        </div>
      </div>
    </div>
    <div class="clear "></div>
    <div class="left ">
      <div class="xxk zb top20 ">
        <ul>
          <li class="on ">比赛直播</li>
          <!--
          <li>欧冠杯</li><li>英超</li><li>意甲</li><li>西甲</li><li>德甲</li><li>法甲</li><li>亚冠杯</li><li>中超</li>
          <li>足协杯</li>-->
        </ul>
      </div>
      <div class="matchb " style="display: block">
        <?php
        //查找时间大于当前时间戳的数据，并连接球队表
        $currenttime = time() - 60*60*2;
        $zblist = db('livedata',[] , false)->alias('ld')->field('ld.*,t.logo_b64 t_l,t1.logo_b64 t1_l')->where('ld.ts > '.$currenttime)
        ->join('team t','t.team_name_cn = ld.home' , 'LEFT')
        ->join('team t1','t1.team_name_cn = ld.away' , 'LEFT')
        ->order('ld.ts asc')
        ->select();
        foreach($zblist as $k=>$v): ?>
        <div class="mymatch" <?php if($k > 33): ?>style="display:none;"<?php endif; ?>>
          <div class="mymatch-left">
            <div class="time"><?php echo date('m-d H:i' , $v['ts']); ?></div>
            <div class="cup"><?php echo $v['cup_title']; ?></div>
          </div>
          <div class="mymatch-right">
            <div class="mr-l">
              <div class="home"><?php echo $v['home']; ?></div>
              <img class="" alt="<?php echo $v['home']; ?>" src="<?php echo $v['t_l']; ?>" onerror="javascript:this.src='/style/images/default_img_60x60.png'" />
              <div class="vs">:</div>
              <img class="" alt="<?php echo $v['away']; ?>" src="<?php echo $v['t1_l']; ?>" onerror="javascript:this.src='/style/images/default_img_60x60.png'" />
              <div class="away"><?php echo $v['away']; ?></div>              
            </div>
            <div class="mr-r">
              <a href="/zhibo/<?php echo $v['id']; ?>.html" class="btn">
                <img src="/style/images/v.png"  />
                <span>高清视频</span>
              </a>
            </div>
          </div>
        </div>
        <?php endforeach; ?>
        <div class="loading">
          <a href="javascript:;;" class="btn show-more">查看更多比赛</a>
        </div>
        <script>
            $(function(){
                $(".show-more").click(function(){
                    $(".mymatch").each(function(i){
                        //是否隐藏
                        if($(this).css("display") == "none"){
                            $(this).show();
                        }
                    });
                    $(this).parent().hide();
                });
            });
        </script>
      </div>

    </div>
    <style>
      
    </style>
    <div class="right ">
      <!--热门球队-->
      <div class="zxqd top20 ">
        <div class="xxk hover-top">
          <ul>
            <li class="on ">足球球队</li>
            <li>篮球球队</li>
          </ul>
        </div>
        <div class="qiudui hover-sub">
            <?php
            $zqqd = db('team',[] , false)->where('lx=1')->order('id desc')->limit(20)->select();
            foreach($zqqd as $k=>$v): ?>
            <a href="/qiudui/<?php echo $v['id']; ?>.html">
            <div class="qitem" style="text-align: center;">
                    <img src="<?php echo $v['team_logo']; ?>" />
                    <span><?php echo $v['team_name_cn']; ?></span>
            </div>
            </a>
          <?php endforeach; ?>
          
        </div>
        <div class="qiudui hover-sub hide" style="display: none;">
            <?php
            $lqqd = db('team',[] , false)->where('lx=2')->order('id desc')->limit(20)->select();
            foreach($lqqd as $k=>$v): ?>
            <a href="/qiudui/<?php echo $v['id']; ?>.html">
                <div class="qitem">
                        <img src="<?php echo $v['team_logo']; ?>" />
                        <span><?php echo $v['team_name_cn']; ?></span>
                </div>
                </a>
          <?php endforeach; ?>
        </div>
      </div>
      <!--热门球队-->
      <div class="zxlx top20 ">
        <div class="xxk hover-top">
          <ul>
            <li class="on ">足球预测</li>
            <li>篮球预测</li>
          </ul>
        </div>
        <div class="huatir  hover-sub">
          <ul>
            <?php $zqyc = db('article_doc',[] , false)->where('category_id=113')->order('create_time desc')->limit(10)->select(); 
            foreach($zqyc as $k=>$v):
            ?>
            <li>
              <i class="vico "></i><a href="/news/<?php echo $v['id']; ?>.html"><?php echo $v['title']; ?></a>
            </li>
            <?php endforeach; ?>
          </ul>
        </div>
        <div class="huatir  hover-sub hide ">
          <ul>
            <?php $lqyc = db('article_doc',[] , false)->where('category_id=112')->order('create_time desc')->limit(10)->select(); 
            foreach($lqyc as $k=>$v):
            ?>
            <li>
              <i class="vico "></i><a href="/news/<?php echo $v['id']; ?>.html"><?php echo $v['title']; ?></a>
            </li>
            <?php endforeach; ?>
          </ul>
        </div>
      </div>
      <div class="zxjj top20 ">
        <div class="xxk  hover-top">
          <ul>
            <li class="on ">足球录像</li>
            <li>篮球录像</li>
          </ul>
        </div>
        <div class="huatir hover-sub ">
          <ul>
            <?php $zqlx = db('article_doc',[] , false)->where('category_id=101')->order('create_time desc')->limit(10)->select(); 
            foreach($zqlx as $k=>$v):
            ?>
            <li>
              <i class="vico "></i><a href="/news/<?php echo $v['id']; ?>.html"><?php echo $v['title']; ?></a>
            </li>
            <?php endforeach; ?>
            
          </ul>
        </div>
        <div class="huatir hover-sub hide ">
          <ul>
            <?php $lqlx = db('article_doc',[] , false)->where('category_id=100')->order('create_time desc')->limit(10)->select(); 
            foreach($lqlx as $k=>$v):
            ?>
            <li>
              <i class="vico "></i><a href="/news/<?php echo $v['id']; ?>.html"><?php echo $v['title']; ?></a>
            </li>
            <?php endforeach; ?>
          </ul>
        </div>
      </div>
      <div class="zxsp top20 ">
        <div class="xxk hover-top">
          <ul>
            <li class="on ">足球集锦</li>
            <li>NBA集锦</li>
            <li>CBA集锦</li>
          </ul>
        </div>
        <div class="huatir  hover-sub">
            <!--
          <a
            href="/shipin/zuqiu/57984.html"
            target="_blank"
            class="video-detail "
          >
            <div class="img-show ">
              <img
                src="//images.bwtsg.com/loading/2025/03/12/gxkeol5pt0e.jpg"
                alt="两次扑点！巴黎球员在更衣室向多纳鲁马大喊MVP"
                class="lazy "
              /><i class="icon icon5 play "></i>
            </div>
            <div class="img-detail ">
              <h5 class="biaoti text-hover ">
                两次扑点！巴黎球员在更衣室向多纳鲁马大喊MVP
              </h5>
            </div>
          </a>
          -->
          <ul>
            <?php $zqjj = db('article_doc',[] , false)->where('category_id=103')->order('create_time desc')->limit(10)->select(); 
            foreach($zqjj as $k=>$v):
            ?>
            <li>
              <i class="vico "></i><a href="/news/<?php echo $v['id']; ?>.html"><?php echo $v['title']; ?></a>
            </li>
            <?php endforeach; ?>
          </ul>
        </div>
        <div class="huatir  hover-sub hide ">
            <ul>
                <?php $nbajj = db('article_doc',[] , false)->where('category_id=102')->order('create_time desc')->limit(10)->select(); 
                foreach($nbajj as $k=>$v):
                ?>
                <li>
                  <i class="vico "></i><a href="/news/<?php echo $v['id']; ?>.html"><?php echo $v['title']; ?></a>
                </li>
                <?php endforeach; ?>
              </ul>
        </div>
        <div class="huatir  hover-sub hide ">
            <ul>
                <?php $cbajj = db('article_doc',[] , false)->where('category_id=116')->order('create_time desc')->limit(10)->select(); 
                foreach($cbajj as $k=>$v):
                ?>
                <li>
                  <i class="vico "></i><a href="/news/<?php echo $v['id']; ?>.html"><?php echo $v['title']; ?></a>
                </li>
                <?php endforeach; ?>
              </ul>
        </div>
      </div>

    </div>
    <div class="clear "></div>
<style>

</style>

    <div class="tyss top20 ">
      <div class="xxk  hover-top">
        <ul>
          <li class="on ">足球资讯</li>
          <li>篮球资讯</li>
        </ul>
      </div>
      <div class=" hover-sub ">
        <?php 
        //查找13个，分成3组，第一组1个，第二组2个，第三组10个
        $zqzx = db('article_doc',[] , false)->where('category_id=114 and pic!=""')->order('create_time desc')->limit(13)->select();
        $zqzx1 = array_slice($zqzx,0,1);
        $zqzx2 = array_slice($zqzx,1,2);
        $zqzx3 = array_slice($zqzx,3,10);
        ?>
        <div class="zixun">
        
          <div class="big-image re-img">
            <a href="/news/<?php echo $zqzx1[0]['id']; ?>.html">
            <img src="<?php echo $zqzx1[0]['pic']; ?>" alt="<?php echo $zqzx1[0]['title']; ?>" />
            </a>
            <div class="re-txt"><span><?php echo $zqzx1[0]['title']; ?></span></div>
          </div>
          <div class="two-image">
            <?php foreach($zqzx2 as $k=>$v): ?>
            <div class="two-image-top re-img">
                <a href="/news/<?php echo $v['id']; ?>.html"></a>
                <img src="<?php echo $v['pic']; ?>" alt="<?php echo $v['title']; ?>" />
                <div class="re-txt sub-txt"><span><?php echo $v['title']; ?></span></div>
            </div>
            <?php endforeach; ?>
          </div>
          <div class="txt-list">
            <ul>
                <?php foreach($zqzx3 as $k=>$v): ?>
                <li>
                    <i class="vico "></i>
                    <a href="/news/<?php echo $v['id']; ?>.html"><?php echo $v['title']; ?></a>
                </li>
                <?php endforeach; ?>
            </ul>
          </div>
        </div>
      </div>
      <div class=" hover-sub hide ">
        <?php 
        //查找13个，分成3组，第一组1个，第二组2个，第三组10个
        $lqzx = db('article_doc',[] , false)->where('category_id=115 and pic!=""')->order('create_time desc')->limit(13)->select();
        $lqzx1 = array_slice($lqzx,0,1);
        $lqzx2 = array_slice($lqzx,1,2);
        $lqzx3 = array_slice($lqzx,3,10);
        ?>
        <div class="zixun">
            <div class="big-image re-img">
                <a href="/news/<?php echo $lqzx1[0]['id']; ?>.html">
                <img src="<?php echo $lqzx1[0]['pic']; ?>" alt="<?php echo $lqzx1[0]['title']; ?>" />
                </a>
                <div class="re-txt"><span><?php echo $lqzx1[0]['title']; ?></span></div>
              </div>
              <div class="two-image">
                <?php foreach($lqzx2 as $k=>$v): ?>
                <div class="two-image-top re-img">
                    <a href="/news/<?php echo $v['id']; ?>.html"></a>
                    <img src="<?php echo $v['pic']; ?>" alt="<?php echo $v['title']; ?>" />
                    <div class="re-txt sub-txt"><span><?php echo $v['title']; ?></span></div>
                </div>
                <?php endforeach; ?>
              </div>
              <div class="txt-list">
                <ul>
                    <?php foreach($lqzx3 as $k=>$v): ?>
                    <li>
                        <i class="vico "></i>
                        <a href="/news/<?php echo $v['id']; ?>.html"><?php echo $v['title']; ?></a>
                    </li>
                    <?php endforeach; ?>
                </ul>
              </div>
        </div>
      </div>  
    </div>
<style>
.yqlj li{float: left;margin: 5px;}
</style>
    <div class="clear "></div>
    <div class="biaoti top20 ">
      <h2>友情链接</h2>
    </div>
    <div class="yqlj top20 ">
      <ul>
        <?php
        $links = db('link' , [] , false)->where('linktype_id' , 1)->order('sorts asc')->select();
        foreach($links as $v):
        ?>
        <li><a href="<?php echo $v['url']; ?>" target="_blank"><?php echo $v['title']; ?> </a></li>
        <?php endforeach; ?>
        
      </ul>
    </div>
  </div>


{/block}